
<div class="demoTable layui-form layui-col-space5 layui-input-inline">
    <div class="layui-input-inline">
        <select id="group_id" name="group_id">
            <option @if(request("group_id")=="") selected @endif value="">--选择分组--</option>
            @foreach($group as $g)
                <option @if($groupId==$g["id"]) selected @endif value='{{$g["id"]}}'>{{$g["name"]}}</option>
            @endforeach
        </select>
    </div>
    <div class="layui-inline layui-show-xs-block">
        <button class="layui-btn" onclick="goToType()"><i class="layui-icon">&#xe615;</i>
        </button>
    </div>
</div>

<script>
    function goToType(){
        let group_id = document.getElementById('group_id').value;
        location.href = '{{ route("admin.category.index",["groupId"=>"xxx"]) }}'.replace(/xxx/, group_id);
    }
</script>
